package com.nlgc365.designpattern.Chapter04_Pattern.Behavior.P05_State.State;

import com.nlgc365.designpattern.Chapter04_Pattern.Behavior.P05_State.Framework.State;

/**
 * 作用: 事件以及事件之后的状态改变与动作
 */
public class MarioStateMachine {
    private int score;
    private State currentState;
    private IStateTransfer state;

    /**
     * 构造函数: 设定实例的初始化状态
     */
    public MarioStateMachine() {
        this.currentState = State.SMALL;
        this.score = 0;
        this.state = new MarioSmall(this);
    }

    /**
     * 函数: 动作 - 获得蘑菇
     */
    public void obtainMushRoom() {
    }

    /**
     * 函数: 动作 - 获得披风
     */
    public void obtainCape() {

    }

    /**
     * 函数: 动作 - 获得火焰
     */
    public void obtainFireFlower() {

    }

    /**
     * 函数: 动作 - 遇到怪物
     */
    public void meetMonster() {

    }

    public int getScore() {
        return this.score;
    }

    public State getCurrentState() {
        return this.currentState;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public void setCurrentState(State currentState) {
        this.currentState = currentState;
    }
}
